library(readxl)
Australia <- read_excel("C:/Users/Biniam/Desktop/Documents/Academic/Thesis/Analysis Folder/Excel Files/Bahrain/Australia.xlsx")
View(Australia)
# Importing Data
AUSTRALIA <- read_excel("C:/Users/Biniam/Desktop/Documents/Academic/Thesis/Analysis Folder/Excel Files/Bahrain/Australia.xlsx")
# Checking the Imported Data
View(AUSTRALIA)
# Creating Time Series Data
AUSTRALIA_ts <- ts(AUSTRALIA, start=c(2004,1), end=c(2018,12), frequency=12)
# Viewing and Checking the Created Time Series Data
AUSTRALIA_ts
sum(is.na(AUSTRALIA_ts))
AUSTRALIA_ts <- tsclean(AUSTRALIA_ts)
library(forecast)
AUSTRALIA_ts <- tsclean(AUSTRALIA_ts)
AUSTRALIA_ts
# Step – 1 of the Box-Jenkins Methodology (Identification: Plotting the Time Series Data)
plot(AUSTRALIA_ts)
# Step-2 of the Box-Jenkins Methodology (Estimating the appropriate model)
AUSTRALIA_ts_model <- auto.arima(AUSTRALIA_ts)
AUSTRALIA_ts_model
AUSTRALIA_ts_model <- auto.arima(AUSTRALIA_ts, ic="aic", trace = TRUE)
AUSTRALIA_ts_model
# Forecasting
options(max.print=1000000)
library(forecast)
AUSTRALIA_ts_forecast <- forecast (AUSTRALIA_ts_model, level=c(95), h=264)
plot(AUSTRALIA_ts_forecast)
AUSTRALIA_ts_forecast
# Importing Data
CHINA <- read_excel("C:/Users/Biniam/Desktop/Documents/Academic/Thesis/Analysis Folder/Excel Files/Bahrain/China.xlsx")
# Checking the Imported Data
View(CHINA)
# Creating Time Series Data
CHINA_ts <- ts(CHINA, start=c(2005,1), end=c(2019,06), frequency=12)
# Viewing and Checking the Created Time Series Data
CHINA_ts
sum(is.na(CHINA_ts))
library(forecast)
CHINA_ts <- tsclean(CHINA_ts)
# Step – 1 of the Box-Jenkins Methodology (Identification: Plotting the Time Series Data)
plot(CHINA_ts)
# Step-2 of the Box-Jenkins Methodology (Estimating the appropriate model)
CHINA_ts_model <- auto.arima(CHINA_ts)
CHINA_ts_model
CHINA_ts_model <- auto.arima(CHINA_ts, ic="aic", trace = TRUE)
CHINA_ts_model
# Step-3 of the Box-Jenkins Methodology (Diagnosis Checking)
library(tseries)
# Forecasting
options(max.print=1000000)
library(forecast)
CHINA_ts_forecast <- forecast (CHINA_ts_model, level=c(95), h=258)
plot(CHINA_ts_forecast)
CHINA_ts_forecast
write.table(China, file="China_TSA.xlsx")
write.table(China, file="China_TSA.csv", sep=",")
write.table(CHINA_ts_forecast, file="China_TSA.csv", sep=",")
write.table(CHINA_ts_forecast, file="China_TSA.xlsx")
write.table(CHINA_ts_forecast, file="China_TSA.xlsx", sep=" ")
write.xlxs(CHINA_ts_forecast, file="China_TSA.xlsx")
install.packages("xlsx")
library(xlsx)
write.xlxs(CHINA_ts_forecast, file="China_TSA.xlsx")
write.xlsx(CHINA_ts_forecast, file="China_TSA.xlsx")
library(xlsx)
write.xlsx(CHINA_ts_forecast, file="China_TSA.xlsx")
install.packages("xlsx")
library(xlsx)
library("xlsx")
write.table(CHINA_ts_forecast, file="China_TSA.csv", sep=",")
# Importing Data
GERMANY <- read_excel("C:/Users/Biniam/Desktop/Documents/Academic/Thesis/Analysis Folder/Excel Files/Bahrain/Germany.xlsx")
# Checking the Imported Data
View(GERMANY)
# Creating Time Series Data
GERMANY_ts <- ts(GERMANY, start=c(2004,1), end=c(2019,07), frequency=12)
# Viewing and Checking the Created Time Series Data
GERMANY_ts
sum(is.na(GERMANY_ts))
library(forecast)
GERMANY_ts <- tsclean(GERMANY_ts)
# Step – 1 of the Box-Jenkins Methodology (Identification: Plotting the Time Series Data)
plot(GERMANY_ts)
# Step-2 of the Box-Jenkins Methodology (Estimating the appropriate model)
GERMANY_ts_model <- auto.arima(GERMANY_ts)
GERMANY_ts_model
GERMANY_ts_model <- auto.arima(GERMANY_ts, ic="aic", trace = TRUE)
GERMANY_ts_model
# Forecasting
options(max.print=1000000)
GERMANY_ts_forecast <- forecast (GERMANY_ts_model, level=c(95), h=257)
plot(GERMANY_ts_forecast)
GERMANY_ts_forecast
write.table(GERMANY_ts_forecast, file="Germany_TSA.csv", sep=",")
# Importing Data
INDIA <- read_excel("C:/Users/Biniam/Desktop/Documents/Academic/Thesis/Analysis Folder/Excel Files/Bahrain/India.xlsx")
# Creating Time Series Data
INDIA_ts <- ts(INDIA, start=c(2008,01), end=c(2019,04), frequency=12)
# Viewing and Checking the Created Time Series Data
INDIA_ts
sum(is.na(INDIA_ts))
library(forecast)
INDIA_ts <- tsclean(INDIA_ts)
# Step – 1 of the Box-Jenkins Methodology (Identification: Plotting the Time Series Data)
plot(INDIA_ts)
# Step-2 of the Box-Jenkins Methodology (Estimating the appropriate model)
INDIA_ts_model <- auto.arima(INDIA_ts)
INDIA_ts_model
INDIA_ts_model <- auto.arima(INDIA_ts, ic="aic", trace = TRUE)
INDIA_ts_model
# Forecasting
options(max.print=1000000)
library(forecast)
INDIA_ts_forecast <- forecast (INDIA_ts_model, level=c(95), h=260)
plot(INDIA_ts_forecast)
INDIA_ts_forecast
# Checking the Imported Data
View(INDIA)
write.table(INDIA_ts_forecast, file="India_TSA.csv", sep=",")
# Importing Data
USA <- read_excel("C:/Users/Biniam/Desktop/Documents/Academic/Thesis/Analysis Folder/Excel Files/Bahrain/USA.xlsx")
# Checking the Imported Data
View(USA)
# Creating Time Series Data
USA_ts <- ts(USA, start=c(2005,01), end=c(2019,07), frequency=12)
# Viewing and Checking the Created Time Series Data
USA_ts
sum(is.na(USA_ts))
library(forecast)
USA_ts <- tsclean(USA_ts)
# Step – 1 of the Box-Jenkins Methodology (Identification: Plotting the Time Series Data)
plot(USA_ts)
# Step-2 of the Box-Jenkins Methodology (Estimating the appropriate model)
USA_ts_model <- auto.arima(USA_ts)
USA_ts_model
USA_ts_model <- auto.arima(USA_ts, ic="aic", trace = TRUE)
USA_ts_model
# Step-3 of the Box-Jenkins Methodology (Diagnosis Checking)
library(tseries)
# Forecasting
options(max.print=1000000)
library(forecast)
USA_ts_forecast <- forecast (USA_ts_model, level=c(95), h=257)
plot(USA_ts_forecast)
USA_ts_forecast
write.table(USA_ts_forecast, file="USA_TSA.csv", sep=",")
# Importing Data
UK <- read_excel("C:/Users/Biniam/Desktop/Documents/Academic/Thesis/Analysis Folder/Excel Files/Bahrain/UK.xlsx")
# Checking the Imported Data
View(UK)
# Creating Time Series Data
UK_ts <- ts(UK, start=c(2004,01), end=c(2019,07), frequency=12)
# Viewing and Checking the Created Time Series Data
UK_ts
sum(is.na(UK_ts))
library(forecast)
UK_ts <- tsclean(UK_ts)
# Step – 1 of the Box-Jenkins Methodology (Identification: Plotting the Time Series Data)
plot(UK_ts)
# Step-2 of the Box-Jenkins Methodology (Estimating the appropriate model)
UK_ts_model <- auto.arima(UK_ts)
UK_ts_model
# Forecasting
options(max.print=1000000)
library(forecast)
UK_ts_forecast <- forecast (UK_ts_model, level=c(95), h=257)
plot(UK_ts_forecast)
UK_ts_forecast
write.table(UK_ts_forecast, file="UK_TSA.csv", sep=",")
# Importing Data
INDONESIA <- read_excel("C:/Users/Biniam/Desktop/Documents/Academic/Thesis/Analysis Folder/Excel Files/Bahrain/Indonesia.xlsx")
# Checking the Imported Data
View(INDONESIA)
# Creating Time Series Data
INDONESIA_ts <- ts(INDONESIA, start=c(2006,01), end=c(2019,01), frequency=12)
# Viewing and Checking the Created Time Series Data
INDONESIA_ts
sum(is.na(INDONESIA_ts))
INDONESIA_ts <- tsclean(INDONESIA_ts)
# Step – 1 of the Box-Jenkins Methodology (Identification: Plotting the Time Series Data)
plot(INDONESIA_ts)
# Step-2 of the Box-Jenkins Methodology (Estimating the appropriate model)
INDONESIA_ts_model <- auto.arima(INDONESIA_ts)
INDONESIA_ts_model
# Forecasting
options(max.print=1000000)
library(forecast)
INDONESIA_ts_forecast <- forecast (INDONESIA_ts_model, level=c(95), h=263)
plot(INDONESIA_ts_forecast)
INDONESIA_ts_forecast
write.table(INDONESIA_ts_forecast, file="INDONESIA_TSA.csv", sep=",")
# Importing Data
TAIWAN <- read_excel("C:/Users/Biniam/Desktop/Documents/Academic/Thesis/Analysis Folder/Excel Files/Bahrain/Taiwan.xlsx")
# Checking the Imported Data
View(TAIWAN)
# Creating Time Series Data
TAIWAN_ts <- ts(TAIWAN, start=c(2003,01), end=c(2018,12), frequency=12)
# Viewing and Checking the Created Time Series Data
TAIWAN_ts
sum(is.na(TAIWAN_ts))
TAIWAN_ts <- tsclean(TAIWAN_ts)
# Step – 1 of the Box-Jenkins Methodology (Identification: Plotting the Time Series Data)
plot(TAIWAN_ts)
# Step-2 of the Box-Jenkins Methodology (Estimating the appropriate model)
TAIWAN_ts_model <- auto.arima(TAIWAN_ts)
TAIWAN_ts_model
# Forecasting
options(max.print=1000000)
library(forecast)
TAIWAN_ts_forecast <- forecast (TAIWAN_ts_model, level=c(95), h=264)
plot(TAIWAN_ts_forecast)
TAIWAN_ts_forecast
write.table(TAIWAN_ts_forecast, file="Taiwan_TSA.csv", sep=",")
# Importing Data
SLOVAKIA <- read_excel("C:/Users/Biniam/Desktop/Documents/Academic/Thesis/Analysis Folder/Excel Files/Bahrain/Slovakia.xlsx")
# Importing Data
SLOVAKIA <- read_excel("C:/Users/Biniam/Desktop/Documents/Academic/Thesis/Analysis Folder/Excel Files/Bahrain/Slovakia.xlsx")
# Checking the Imported Data
View(SLOVAKIA)
# Creating Time Series Data
SLOVAKIA_ts <- ts(SLOVAKIA, start=c(2004,01), end=c(2019,07), frequency=12)
# Viewing and Checking the Created Time Series Data
SLOVAKIA_ts
sum(is.na(SLOVAKIA_ts))
library(forecast)
SLOVAKIA_ts <- tsclean(SLOVAKIA_ts)
# Step – 1 of the Box-Jenkins Methodology (Identification: Plotting the Time Series Data)
plot(SLOVAKIA_ts)
# Step-2 of the Box-Jenkins Methodology (Estimating the appropriate model)
SLOVAKIA_ts_model <- auto.arima(SLOVAKIA_ts)
SLOVAKIA_ts_model
# Forecasting
options(max.print=1000000)
library(forecast)
SLOVAKIA_ts_forecast <- forecast (SLOVAKIA_ts_model, level=c(95), h=257)
plot(SLOVAKIA_ts_forecast)
SLOVAKIA_ts_forecast
write.table(SLOVAKIA_ts_forecast, file="Slovakia_TSA.csv", sep=",")
# Importing Data
KOREA <- read_excel("C:/Users/Biniam/Desktop/Documents/Academic/Thesis/Analysis Folder/Excel Files/Bahrain/Korea.xlsx")
# Checking the Imported Data
View(KOREA)
# Creating Time Series Data
KOREA_ts <- ts(KOREA, start=c(2008,01), end=c(2019,07), frequency=12)
# Viewing and Checking the Created Time Series Data
KOREA_ts
sum(is.na(KOREA_ts))
library(forecast)
KOREA_ts <- tsclean(KOREA_ts)
# Step – 1 of the Box-Jenkins Methodology (Identification: Plotting the Time Series Data)
plot(KOREA_ts)
# Step-2 of the Box-Jenkins Methodology (Estimating the appropriate model)
KOREA_ts_model <- auto.arima(KOREA_ts)
KOREA_ts_model
# Forecasting
options(max.print=1000000)
library(forecast)
KOREA_ts_forecast <- forecast (KOREA_ts_model, level=c(95), h=257)
plot(KOREA_ts_forecast)
KOREA_ts_forecast
write.table(KOREA_ts_forecast, file="Korea_TSA.csv", sep=",")
# Importing Data
THAILAND <- read_excel("C:/Users/Biniam/Desktop/Documents/Academic/Thesis/Analysis Folder/Excel Files/Bahrain/Thailand.xlsx")
# Creating Time Series Data
THAILAND_ts <- ts(THAILAND, start=c(2007,01), end=c(2019,07), frequency=12)
# Viewing and Checking the Created Time Series Data
THAILAND_ts
sum(is.na(THAILAND_ts))
THAILAND_ts <- tsclean(THAILAND_ts)
# Step – 1 of the Box-Jenkins Methodology (Identification: Plotting the Time Series Data)
plot(THAILAND_ts)
# Step-2 of the Box-Jenkins Methodology (Estimating the appropriate model)
THAILAND_ts_model <- auto.arima(THAILAND_ts)
THAILAND_ts_model
# Forecasting
options(max.print=1000000)
library(forecast)
THAILAND_ts_forecast <- forecast (THAILAND_ts_model, level=c(95), h=257)
plot(THAILAND_ts_forecast)
THAILAND_ts_forecast
write.table(THAILAND_ts_forecast, file="Thailand_TSA.csv", sep=",")
# Importing Data
ITALY <- read_excel("C:/Users/Biniam/Desktop/Documents/Academic/Thesis/Analysis Folder/Excel Files/Bahrain/Italy.xlsx")
# Creating Time Series Data
ITALY_ts <- ts(ITALY, start=c(2004,01), end=c(2019,07), frequency=12)
# Viewing and Checking the Created Time Series Data
ITALY_ts
sum(is.na(ITALY_ts))
ITALY_ts <- tsclean(ITALY_ts)
# Step – 1 of the Box-Jenkins Methodology (Identification: Plotting the Time Series Data)
plot(ITALY_ts)
# Step-2 of the Box-Jenkins Methodology (Estimating the appropriate model)
ITALY_ts_model <- auto.arima(ITALY_ts)
ITALY_ts_model
# Forecasting
options(max.print=1000000)
library(forecast)
ITALY_ts_forecast <- forecast (ITALY_ts_model, level=c(95), h=257)
plot(ITALY_ts_forecast)
ITALY_ts_forecast
write.table(ITALY_ts_forecast, file="Italy_TSA.csv", sep=",")
# Importing Data
KUWAIT <- read_excel("C:/Users/Biniam/Desktop/Documents/Academic/Thesis/Analysis Folder/Excel Files/Bahrain/KUWAIT.xlsx")
# Creating Time Series Data
KUWAIT_ts <- ts(KUWAIT, start=c(2008,01), end=c(2017,12), frequency=12)
# Viewing and Checking the Created Time Series Data
KUWAIT_ts
sum(is.na(KUWAIT_ts))
library(forecast)
KUWAIT_ts <- tsclean(KUWAIT_ts)
# Step – 1 of the Box-Jenkins Methodology (Identification: Plotting the Time Series Data)
plot(KUWAIT_ts)
# Step-2 of the Box-Jenkins Methodology (Estimating the appropriate model)
KUWAIT_ts_model <- auto.arima(KUWAIT_ts)
KUWAIT_ts_model
# Forecasting
options(max.print=1000000)
library(forecast)
KUWAIT_ts_forecast <- forecast (KUWAIT_ts_model, level=c(95), h=276)
plot(KUWAIT_ts_forecast)
KUWAIT_ts_forecast
write.table(KUWAIT_ts_forecast, file="Kuwait_TSA.csv", sep=",")
# Importing Data
JAPAN <- read_excel("C:/Users/Biniam/Desktop/Documents/Academic/Thesis/Analysis Folder/Excel Files/Bahrain/Japan.xlsx")
# Creating Time Series Data
JAPAN_ts <- ts(JAPAN, start=c(2001,01), end=c(2019,07), frequency=12)
# Viewing and Checking the Created Time Series Data
JAPAN_ts
sum(is.na(JAPAN_ts))
library(forecast)
JAPAN_ts <- tsclean(JAPAN_ts)
# Step – 1 of the Box-Jenkins Methodology (Identification: Plotting the Time Series Data)
plot(JAPAN_ts)
# Step-2 of the Box-Jenkins Methodology (Estimating the appropriate model)
JAPAN_ts_model <- auto.arima(JAPAN_ts)
JAPAN_ts_model
# Forecasting
options(max.print=1000000)
library(forecast)
JAPAN_ts_forecast <- forecast (JAPAN_ts_model, level=c(95), h=257)
plot(JAPAN_ts_forecast)
JAPAN_ts_forecast
write.table(JAPAN_ts_forecast, file="Japan_TSA.csv", sep=",")
# Importing Data
AUSTRALIA <- read_excel("C:/Users/Biniam/Desktop/Documents/Academic/Thesis/Analysis Folder/Excel Files/Bahrain/Australia.xlsx")
# Creating Time Series Data
AUSTRALIA_ts <- ts(AUSTRALIA, start=c(2004,1), end=c(2018,12), frequency=12)
# Viewing and Checking the Created Time Series Data
AUSTRALIA_ts
sum(is.na(AUSTRALIA_ts))
library(forecast)
AUSTRALIA_ts <- tsclean(AUSTRALIA_ts)
# Step – 1 of the Box-Jenkins Methodology (Identification: Plotting the Time Series Data)
plot(AUSTRALIA_ts)
# Step-2 of the Box-Jenkins Methodology (Estimating the appropriate model)
AUSTRALIA_ts_model <- auto.arima(AUSTRALIA_ts)
AUSTRALIA_ts_model
# Forecasting
options(max.print=1000000)
library(forecast)
AUSTRALIA_ts_forecast <- forecast (AUSTRALIA_ts_model, level=c(95), h=264)
plot(AUSTRALIA_ts_forecast)
AUSTRALIA_ts_forecast
# Importing Data
AUSTRALIA <- read_excel("C:/Users/Biniam/Desktop/Documents/Academic/Thesis/Analysis Folder/Excel Files/Bahrain/Australia.xlsx")
library(readxl)
Australia <- read_excel("C:/Users/Biniam/Desktop/Documents/Academic/Thesis/Analysis Folder/Excel Files/Bahrain/Australia.xlsx")
View(Australia)
# Importing Data
AUSTRALIA <- read_excel("C:/Users/Biniam/Desktop/Documents/Academic/Thesis/Analysis Folder/Excel Files/Bahrain/Australia.xlsx")
# Creating Time Series Data
AUSTRALIA_ts <- ts(AUSTRALIA, start=c(2004,1), end=c(2017,11), frequency=12)
# Viewing and Checking the Created Time Series Data
AUSTRALIA_ts
sum(is.na(AUSTRALIA_ts))
library(forecast)
AUSTRALIA_ts <- tsclean(AUSTRALIA_ts)
# Step – 1 of the Box-Jenkins Methodology (Identification: Plotting the Time Series Data)
plot(AUSTRALIA_ts)
# Step-2 of the Box-Jenkins Methodology (Estimating the appropriate model)
AUSTRALIA_ts_model <- auto.arima(AUSTRALIA_ts)
AUSTRALIA_ts_model
# Forecasting
options(max.print=1000000)
library(forecast)
AUSTRALIA_ts_forecast <- forecast (AUSTRALIA_ts_model, level=c(95), h=277)
plot(AUSTRALIA_ts_forecast)
AUSTRALIA_ts_forecast
write.table(AUSTRALIA_ts_forecast, file="Australia_TSA.csv", sep=",")
# Importing Data
USA <- read_excel("C:/Users/Biniam/Desktop/Documents/Academic/Thesis/Analysis Folder/Excel Files/Bahrain/USA.xlsx")
# Creating Time Series Data
USA_ts <- ts(USA, start=c(2005,01), end=c(2019,07), frequency=12)
# Viewing and Checking the Created Time Series Data
USA_ts
sum(is.na(USA_ts))
library(forecast)
USA_ts <- tsclean(USA_ts)
# Step – 1 of the Box-Jenkins Methodology (Identification: Plotting the Time Series Data)
plot(USA_ts)
# Step-2 of the Box-Jenkins Methodology (Estimating the appropriate model)
USA_ts_model <- auto.arima(USA_ts)
USA_ts_model
# Forecasting
options(max.print=1000000)
library(forecast)
USA_ts_forecast <- forecast (USA_ts_model, level=c(95), h=257)
plot(USA_ts_forecast)
USA_ts_forecast
write.table(USA_ts_forecast, file="USA_TSA.csv", sep=",")
